<div id="online-check-in-view">
  <div class="pageheader">
    <h2><i class="fa fa-home"></i>线上入住(合同号：{{contractData.uuid}})</h2>
    <div class="al-header-right">
      <button type="button" class="btn btn-warning" ng-click="backToEntrance()">返回</button>
    </div>
  </div>
  <div class="page">
    <ng-form class="form-horizontal">
      <div class="form-group">
        <h4 class="text-center">房间信息</h4>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">公寓</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.apartmentName}}</div>
        </div>
        <label class="control-label col-sm-2">楼栋</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.buildingName}}</div>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">合同开始日期</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.leaseStart|dateTransfer:'YYYY-MM-DD'}}</div>
        </div>
        <label class="control-label col-sm-2">合同签署时间</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.signTime}}</div>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">楼层</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.floor}}</div>
        </div>
        <label class="control-label col-sm-2">房间号</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.houseNo}}</div>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">租房方式</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.payWay|constantTransfer:payWayList}}</div>
        </div>
        <label class="control-label col-sm-2">租期</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.leaseName}}</div>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">月租金</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.rental}}</div>
        </div>
        <label class="control-label col-sm-2">押金</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.deposit}}</div>
        </div>
      </div>
    </ng-form>
    <ng-form class="form-horizontal">
      <div class="form-group">
        <h4 class="text-center">租客信息</h4>
      </div>
      <div class="form-group">
        <div class="col-sm-6">
          <div class="form-group">
            <label class="control-label col-sm-4 col-sm-offset-2">租客名称</label>
            <div class="col-sm-6">
              <div class="form-control info-text">{{contractData.customerName}}</div>
            </div>

          </div>
          <div class="form-group">
            <label class="control-label col-sm-4 col-sm-offset-2">租客手机号</label>
            <div class="col-sm-6">
              <div class="form-control info-text">{{contractData.customerPhone}}</div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4 col-sm-offset-2">身份证</label>
            <div class="col-sm-6">
              <div class="form-control info-text">{{contractData.customerCard}}</div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4 col-sm-offset-2">性别</label>
            <div class="col-sm-6">
              <nobr>
                <label class="ui-radio" ng-repeat="option in sexList">
                  <input name="status" ng-value="option.value" type="radio" ng-model="contractData.sex" readonly>
                  <span>{{option.name}}</span>
                </label>
              </nobr>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4 col-sm-offset-2">住客人数</label>
            <div class="col-sm-6">
              <div class="input-group">
                <input type="number" class="form-control" readonly ng-model="contractData.cotenant.length" maxlength="4">
                <span class="input-group-addon" ng-click="openCotenant('view',contractData.cotenant)">查看</span>
              </div>
            </div>
          </div>
        </div>
        <div class="col-sm-6">
          <div class="form-group" style="margin-bottom: 10px;">
            <label class="control-label col-sm-4 ">身份证正面</label>
            <div class="col-sm-6 id-card-container">
              <img ng-src="{{person.idcardFront}}" alt="上传身份证反面"
                   ng-click="uploadIDCFront()">
              <input id="on-idcard-front" style="display: none" type="file" >
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4">身份证反面</label>
            <div class="col-sm-6 id-card-container">
              <img ng-src="{{person.idcardBack}}" alt="上传身份证反面"
                   ng-click="uploadIDCBack()">
              <input id="on-idcard-back" style="display: none" type="file" >
            </div>
          </div>
        </div>
      </div>
    </ng-form>
    <ng-form class="form-horizontal">
      <div class="form-group">
        <h4 class="text-center">付款信息</h4>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">租金</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.rental}}</div>
        </div>
        <label class="control-label col-sm-2">押金</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.deposit}}</div>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-2 col-sm-offset-1">付款方式</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.payTypeName}}</div>
        </div>
        <label class="control-label col-sm-2">付款状态</label>
        <div class="col-sm-3">
          <div class="form-control info-text">{{contractData.status==2}}</div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-3"></div>
        <div class="col-sm-3">
          <button class="btn btn-primary" ng-disabled="contractData.checked"
                  ng-click="onlineCheckIn()">快捷入住</button>
        </div>
        <div class="col-sm-3"><button class="btn btn-warning" ng-click="printContract()">合同打印</button></div>
        <div class="col-sm-3"></div>
      </div>
    </ng-form>
  </div>
</div>